﻿<Window x:Class="Lego.Ev3.Tester.Wpf.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen" SizeToContent="Height">
    <StackPanel>
		<StackPanel Orientation="Horizontal">
			<ComboBox x:Name="Ports"/>
			<Button x:Name="Connect" Click="Connect_Click">Connect</Button>
			<Button x:Name="Disconnect" Click="Disconnect_Click">Disconnect</Button>
			<Button x:Name="ClearAll" Click="ClearAll_Click">Clear All Devices</Button>
		</StackPanel>
		<Button x:Name="PlayTone" Click="PlayTone_Click">Play Tone</Button>
		<Button x:Name="GetFirmwareVersion" Click="GetFirmwareVersion_Click">Get FW Version</Button>
		<Button x:Name="TurnMotorPower" Click="TurnMotorPower_Click">Turn Motor at Power</Button>
		<Button x:Name="TurnMotorSpeed" Click="TurnMotorSpeed_Click">Turn Motor at Speed</Button>
		<Button x:Name="StepMotorPower" Click="StepMotorPower_Click">Step Motor at Power</Button>
		<Button x:Name="StepMotorSpeed" Click="StepMotorSpeed_Click">Step Motor at Speed</Button>
		<Button x:Name="TimeMotorPower" Click="TimeMotorPower_Click">Time Motor at Power</Button>
		<Button x:Name="TimeMotorSpeed" Click="TimeMotorSpeed_Click">Time Motor at Speed</Button>
		<Button x:Name="StopMotor" Click="StopMotor_Click">Stop Motor</Button>
		<Button x:Name="SetLed" Click="SetLed_Click">Set LED</Button>
		<Button x:Name="PlaySound" Click="PlaySound_Click">Upload and Play Sound</Button>
		<Button x:Name="Draw" Click="Draw_Click">Draw on LCD</Button>
		<Button x:Name="BatchNoReply" Click="BatchNoReply_Click">Batch with No Reply</Button>
		<Button x:Name="BatchReply" Click="BatchReply_Click">Batch with Reply</Button>
		<TextBox x:Name="Output"/>
		<ListBox x:Name="InputPorts" ItemsSource="{Binding}">
			<ListBox.ItemTemplate>
				<DataTemplate>
					<StackPanel Orientation="Horizontal">
						<TextBlock>
							<Run Text="Index: "/><TextBlock Text="{Binding Key}"/>
							<Run Text=", Type: "/><TextBlock Text="{Binding Value.Type}"/>
							<Run Text=", Mode: "/><TextBlock Text="{Binding Value.Mode}"/>
							<Run Text=", SI Value: "/><TextBlock Text="{Binding Value.SIValue}"/>
							<Run Text=", Raw Value: "/><TextBlock Text="{Binding Value.RawValue}"/>
							<Run Text=", Pct Value: "/><TextBlock Text="{Binding Value.PercentValue}"/>
						</TextBlock>
					</StackPanel>
				</DataTemplate>
			</ListBox.ItemTemplate>
		</ListBox>
		<TextBlock x:Name="Buttons">
			<Run Text="Up: "/><TextBlock Text="{Binding Up}"/><LineBreak/>
			<Run Text="Down: "/><TextBlock Text="{Binding Down}"/><LineBreak/>
			<Run Text="Left: "/><TextBlock Text="{Binding Left}"/><LineBreak/>
			<Run Text="Right: "/><TextBlock Text="{Binding Right}"/><LineBreak/>
			<Run Text="Back: "/><TextBlock Text="{Binding Back}"/><LineBreak/>
			<Run Text="Enter: "/><TextBlock Text="{Binding Enter}"/><LineBreak/>
		</TextBlock>
	</StackPanel>
</Window>
